// 全局样式重置
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: $bg-light;
  color: $text-primary;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: $font-size-md;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  background-color: $bg-light;
}

// 小红书风格按钮
.xhs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: $spacing-sm $spacing-md;
  border: none;
  border-radius: $border-radius-large;
  font-size: $font-size-sm;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  
  &.primary {
    background: linear-gradient(135deg, $primary-color 0%, $primary-light 100%);
    color: $text-white;
    box-shadow: $shadow-light;
    
    &:hover {
      background: linear-gradient(135deg, $primary-dark 0%, $primary-color 100%);
      box-shadow: $shadow-medium;
      transform: translateY(-1px);
    }
  }
  
  &.secondary {
    background: $bg-white;
    color: $primary-color;
    border: 1px solid $border-light;
    
    &:hover {
      background: $secondary-color;
      border-color: $primary-light;
    }
  }
  
  &.ghost {
    background: transparent;
    color: $primary-color;
    border: 1px solid $primary-color;
    
    &:hover {
      background: $primary-color;
      color: $text-white;
    }
  }
}

// 小红书风格卡片
.xhs-card {
  background: $bg-card;
  border-radius: $border-radius-large;
  box-shadow: $shadow-light;
  overflow: hidden;
  transition: all 0.3s ease;
  
  &:hover {
    box-shadow: $shadow-medium;
    transform: translateY(-2px);
  }
}

// 小红书风格头像
.xhs-avatar {
  border-radius: $border-radius-round;
  overflow: hidden;
  display: inline-block;
  border: 2px solid $bg-white;
  box-shadow: $shadow-light;
}

// 小红书风格标签
.xhs-tag {
  display: inline-block;
  padding: $spacing-xs $spacing-sm;
  background: $secondary-color;
  color: $primary-color;
  border-radius: $border-radius-large;
  font-size: $font-size-xs;
  font-weight: 500;
  margin-right: $spacing-xs;
  margin-bottom: $spacing-xs;
}

// 小红书风格输入框
.xhs-input {
  width: 100%;
  padding: $spacing-md;
  border: 1px solid $border-light;
  border-radius: $border-radius-medium;
  font-size: $font-size-md;
  background: $bg-white;
  transition: all 0.3s ease;
  
  &:focus {
    outline: none;
    border-color: $primary-color;
    box-shadow: 0 0 0 2px rgba(255, 36, 66, 0.1);
  }
  
  &::placeholder {
    color: $text-light;
  }
}

// 瀑布流布局
.waterfall-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-gap: $spacing-md;
  padding: $spacing-md;
  
  @media (max-width: $breakpoint-sm) {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: $spacing-sm;
    padding: $spacing-sm;
  }
}

// 渐变文字
.gradient-text {
  background: linear-gradient(135deg, $primary-color 0%, $primary-light 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

// 小红书风格导航
.xhs-navbar {
  background: $bg-white;
  border-bottom: 1px solid $border-light;
  box-shadow: $shadow-light;
  position: sticky;
  top: 0;
  z-index: 1000;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: $bg-light;
}

::-webkit-scrollbar-thumb {
  background: $border-medium;
  border-radius: 3px;
  
  &:hover {
    background: $border-dark;
  }
}

// 动画效果
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

// 响应式工具类
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

// 间距工具类
.mb-sm { margin-bottom: $spacing-sm; }
.mb-md { margin-bottom: $spacing-md; }
.mb-lg { margin-bottom: $spacing-lg; }

.mt-sm { margin-top: $spacing-sm; }
.mt-md { margin-top: $spacing-md; }
.mt-lg { margin-top: $spacing-lg; }

.p-sm { padding: $spacing-sm; }
.p-md { padding: $spacing-md; }
.p-lg { padding: $spacing-lg; }

// Element Plus 主题定制
.el-button--primary {
  background: linear-gradient(135deg, $primary-color 0%, $primary-light 100%);
  border-color: $primary-color;
  
  &:hover {
    background: linear-gradient(135deg, $primary-dark 0%, $primary-color 100%);
    border-color: $primary-dark;
  }
} 